<div class="panel panel-primary">
    <!-- Default panel contents -->
    <div class="panel-heading">Control de fallas</div>
    <div class="panel-body">
        <button class="btn btn-success" ng-click="addFalla()">Agregar Falla</button>
    </div>
    <table class="table table-condensed" >
        <thead >
            <tr>
                <th>Causa</th>
                <th>Inicio</th>
                <th>Fin</th>
                <th>Observaciones</th>
            </tr>
        </thead>
    </table>
    <div class="div-table-content2">
        <table class="table table-condensed">
            <tbody>
                <tr ng-repeat="tiempos in TiemposMuertos">
                    <th><select class="form-control" ng-model-options="{updateOn: 'blur'}" ng-change="saveFalla({{$index}})" ng-model="tiempos.IdCausa">
                            <optgroup ng-repeat="falla in fallas" label="{{falla.Descripcion}}">
                                <option ng-repeat="causa in falla.causas" value="{{causa.IdCausa}}">{{causa.Descripcion}}</option>
                            </optgroup>
                    </select></th>
                    <th><input class="form-control" type="time" ng-model-options="{updateOn: 'blur'}" ng-change="saveFalla({{$index}})" ng-model="tiempos.Inicio" value="{{tiempos.Inicio}}"/></th>
                    <th><input class="form-control" type="time" ng-model-options="{updateOn: 'blur'}" ng-change="saveFalla({{$index}})" ng-model="tiempos.Fin" value="{{tiempos.Fin}}"/></th>
                    <th><textarea class="form-control" ng-change="saveFalla({{$index}})" ng-model="tiempos.Descripcion" value="{{tiempos.Descripcion}}"></textarea></th>
                    <th><button class="btn btn-danger" ng-click="deleteDetalle({{tiempos.IdTiempoMuerto}})">Eliminar</button></th>
                </tr>
            </tbody>
        </table>
    </div>
    <table class="table table-condensed">
        <tfoot>
            <tr>
                <th colspan="13">&nbsp;</th>
            </tr>
        </tfoot>
    </table>
</div>